package com.taptech.doufu.ui.viewholder.personalcenter;

import android.content.Context;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

public abstract class BaseAdapterViewHolder {
	public Context mContext;
	public int mPositon;
	public int mLayoutId;
	public View mConvertView;
	//内容来源
	public TextView mCircleSource;

	public static final int DELETE_NOTE_ITEM = 10001;
	public static final int DELETE_NOVEL_REVIEW_ITEM = 10002;
	public static final int DELETE_NOVEL_ITEM = 10003;
	public static final int DELETE_TOPIC_ITEM = 10004;
	
	public BaseAdapterViewHolder(Context context , int position , int layoutId) {
		// TODO Auto-generated constructor stub
		mContext = context;
		mPositon = position;
		mLayoutId = layoutId;
		try {
			mConvertView = LayoutInflater.from(mContext).inflate(mLayoutId, null);
		}catch (NullPointerException e){

		}

	}
	
	public View getConvertView(){		
		return mConvertView;		
	}
	
	abstract public BaseAdapterViewHolder createViewHolder(Context context, int position);
	//获取子控件的实例
	abstract public void getChildView(View convertView); 
	//设置子控件
	abstract public void setChildView(Object object,int singlePage);

	abstract public void setChildView(Object object , String keyWord,int singlePage);

	abstract public void setHandler(Handler handler);


	public TextView getmCircleSource() {
		return mCircleSource;
	}

	public void setmCircleSource(TextView mCircleSource) {
		this.mCircleSource = mCircleSource;
	}
}
